<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let arr = ['appple', 'banana', 'orange', 'tomato']
        arr.forEach(function(val, index, arr) {
            console.log(val, index, arr);
        });
        // 代替for循环的
    </script>

    <script>
    </script>
</body>

</html>